home *** CD-ROM | disk | FTP | other *** search
- Path: news1.intercall.com!usenet
- From: engevar@intercall.com (Steven Ovits)
- Newsgroups: comp.lang.c++
- Subject: Re: NEWBIE input question
- Date: Sat, 30 Mar 1996 23:40:06 GMT
- Organization: Intercall Inc.
- Message-ID: <4jk75f$ae0@news1.intercall.com>
- References: <312A0334.AC5@supaero.fr> <4gfg6m$eet@hasle.sn.no> <4hagmf$qc0@donald.interpac.be> <4j5mqr$su7@ohnasn01.sinet.slb.com> <4jc1d6$2tv@news.inc.net> <315A2DA2.716E@oacis.com> <4jeel6$jkm@news.clandjop.com> <zakrzews.828148776@pegasus.montclair.edu> <4jiorp$c61@dfw-ixnews4.ix.netcom.com>
- NNTP-Posting-Host: ts2-111.intercall.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- froman@ix.netcom.com(James Edward Sands III ) wrote:
-
- >I would like to write a function that lets the user input a certain
- >number of a data type, then stop when it gets to the end.
- >Such as a zip of 89043
- >when the user types the three, the prompt just sits on the three (until
- >the enter key is pressed).
- >I will be using such a function for user input things like
- >state abbreviation (2 char), a zip (five ints), and the sort.
- >I have played around using the gotoxy for placement of the cursor
- >but have had no success, and unfourtunately the computer I am at
- >now is not the one a program on. Can someone give me any suggestions
- >or just even a word or two that might point me in the right directions.
-
- >Thanks
- >Jim
-
- The problem has been "dealt with" by the standards committee.
- The problem is that there's no portable way to do this.
- The reason is that some systems are networks of terminals that
- only communicate at certain times--for example, when you press
- the enter key. This is why C doesn't support the feature. Nor
- does it have any loopholes that allow you to hack a solution.
-
- You'll need to do this at a systems level. Since you mention
- gotoxy(), I'll assume you're using Borland's compiler. They
- provide a function called bioskey() that mimics the DOS
- keyboard function. If you use it, be careful to check that
- it does the right thing--there's an error in Borland's
- documentation. If you're using another compiler, check for
- a similar function or write the code in assembler using
- INT 21h functions.
-
-